﻿using System;
using System.Reflection;

namespace M2Server
{
    /// <summary>
    /// 怪物抽象工厂
    /// </summary>
    public abstract class MonFactory
    {
        /// <summary>
        /// 创建怪物
        /// </summary>
        /// <param name="MonName"></param>
        public abstract void CreateMonster(string MonName,Type type);
    }

    public class MonTest : MonFactory
    {
        
        public MonTest() {
            CreateMonster("a", typeof(TSuperGuard));
        }

        public override void CreateMonster(string MonName, Type type)
        {
            Assembly t = Assembly.Load(type.FullName);
            t.CreateInstance(type.Assembly.FullName);
        }
    }
}
